package com.etc.youkeshoppingssm.service.impl;

import com.etc.youkeshoppingssm.dao.IGoodsDao;
import com.etc.youkeshoppingssm.entity.Category;
import com.etc.youkeshoppingssm.entity.Goods;
import com.etc.youkeshoppingssm.service.IGoodsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements IGoodsService {
    private final static Logger logger = LoggerFactory.getLogger(GoodsServiceImpl.class);
    @Autowired
    private IGoodsDao dao;
    @Override
    public List<Category> showIndex() {
        List<Category> list = dao.showIndex();
        return list;
    }

    @Override
    public Goods findOfGood(int id) {
        logger.info("{}",id);
        return dao.findOfGood(id);
    }
}
